<template>
    <section>
        <el-table :data="currObj.detail" highlight-current-row v-loading="listLoading">

            <el-table-column prop="name" label="材料名称">
                <template scope="scope">
                    <el-input size="small" placeholder="请输入内容" v-model="scope.row.name">
                    </el-input>
                </template>
            </el-table-column>
            <el-table-column label="编码">
                <template scope="scope">
                    <el-input size="small" placeholder="请输入内容" v-model="scope.row.code">
                    </el-input>
                </template>
            </el-table-column>


            <el-table-column label="门幅">
                <template scope="scope">
                    <el-input size="small" placeholder="请输入内容" v-model.number="scope.row.menfu">
                    </el-input>
                </template>
            </el-table-column>
            <el-table-column label="单件用量">
                <template scope="scope">
                    <el-input size="small" placeholder="请输入内容" @blur="fmtTask()" v-model.number="scope.row.num">
                    </el-input>
                </template>
            </el-table-column>

            <el-table-column label="单位">
                <template scope="scope">
                    <el-select v-model="scope.row.unitId" placeholder="请选择">
                        <el-option v-for="unit in unitArray" :label="unit.name" :value="unit.id">
                        </el-option>
                    </el-select>
                </template>
            </el-table-column>
            <el-table-column label="单价">
                <template scope="scope">
                    <el-input size="small" placeholder="请输入内容" @blur="fmtTask()" v-model.number="scope.row.price">
                    </el-input>
                </template>
            </el-table-column>
            <el-table-column label="小计">
                <template scope="scope">
                    <el-input size="small" placeholder="请输入内容" v-model.number="scope.row.amount">
                    </el-input>
                </template>
            </el-table-column>
            <el-table-column label="操作" width="80">
                <template scope="scope">
                    <el-button size="small" @click="delDetal(scope.row, scope.$index)">删除</el-button>

                </template>
            </el-table-column>
        </el-table>


        <el-button @click.prevent="addDetail()"> 新增一行</el-button>
    </section>
</template>
<script src="./t100.js"></script>